home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 4
/
Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso
/
Pearls
/
ham
/
ax.25
/
tnt
/
tnt.doc
< prev
next >
Wrap
Text File
|
1995-04-12
|
71KB
|
1,941 lines
TNT - A UNIX Packet-Radio Terminal Program
------------------------------------------
(last modified: 95/01/08)
Index
-----
0. Introduction
0.1 License, copying, warranty
0.2 About Packet Radio and TNT
0.3 Why this program?
0.4 What's needed?
0.5 Mailbox program DPBox
1. Description
1.1 Virtual screens
1.2 Main statusline
1.3 Keyboard-commands
1.3.1 Cursor movement and miscellaneous
1.3.2 Window movement and control
1.3.3 Screen switching
1.3.4 Keyboard macros
1.4 Commands in command mode
1.4.1 TNC-commands
1.4.2 External commands
1.4.2.1 Writing data to files
1.4.2.2 Sending files
1.4.2.3 Shell,Run and redirect
1.4.2.4 Directory
1.4.2.5 Miscellaneous
1.4.2.6 Extended monitor and boxlist
1.4.2.7 Interface commands
1.4.2.8 DPBox-interface commands
1.4.2.9 Password generation commands
2. Special features
2.1 Remote commands
2.2 Umlaut conversion
2.2.1 Display
2.2.2 Sending text
2.2.3 File-receive
2.2.4 File-send
2.3 Using UNIX-features
2.3.1 Shell-login and Redirection
2.3.2 Running programs
2.3.3 Socket interface
2.4 AutoBIN: File transfer
2.5 Special connect text and files with macros, Name-database
2.6 Routing scripts
2.7 Call update
2.8 Logbook
2.9 Keyboard macros
2.10 Boxlist
2.10.1 General description
2.10.2 Using boxlist
2.10.3 Using keyboard macros
2.10.4 Recognized formats
2.11 Extended monitor
2.12 Use of DPBox
2.12.1 General description
2.12.2 Using unix socket interface
2.12.3 Mailbox screen
2.12.4 Using DPBox via Packet Radio
2.12.5 Autobox and monbox feature
2.13 Automatic password generation
2.13.1 General description
2.13.2 DIEBOX
3. Installation
3.1 Configuration file
3.1.1 Serial and general configuration
3.1.2 Security
3.1.3 Directories and Files
3.1.4 Lines of virtual screens
3.1.5 Display configuration
3.1.6 Screen attributes
3.1.6.1 Color attributes
3.1.6.2 Monochrom attributes
3.1.7 Packet assembly timeout
3.2 TNC-configuration files
3.3 Cookie file
3.4 Files for remote commands
3.5 Files for connect text
3.6 Files for names database and routing scripts
3.7 User-Id's and security
3.8 Logfile for resyncronisation
3.9 File for keyboard macros
3.10 File for password generation
4. Options at startup
5. Running under X11
6. Porting of TNT
7. The end
0. Introduction
---------------
0.1 License, copying, warranty
------------------------------
TNT is Copyright (C) 1993-1995 by Mark Wahl, DL4YBG
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details (contained in file 'license').
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0.2 About Packet Radio and TNT
------------------------------
Packet-Radio is a special mode used by Radio Amateurs to transfer text and
data. It is packet orientend and uses the AX.25-protocol (a special version
of X.25 to fit Ham Radio needs).
There are some single board computers which implement the AX.25-protocol
and contain the modem-interface to the radio-transceiver. The terminal or
computer with terminalprogram is connected via a RS232-interface. These
single board computers are called Terminal Node Controller (TNC).
For most of these TNCs a special software is available (WA8DED-Software or
The Firmware by NORD><LINK) which can be switched to a special protocol
(hostmode) at the RS232-interface. If hostmode is selected it is not
possible to operate the TNC using a simple terminal, a computer with a
special terminalprogram is needed.
The advantage of hostmode is that the terminalprogram can implement virtual
screens for the different connections, the command mode and monitor mode.
All these will be displayed together on a normal terminal which leads to
confusion of the operator.
TNT is such a terminalprogram (TNT stands for TNc Terminalprogram).
0.3 Why this program?
---------------------
There are some implementations of the AX.25-protocol available for UNIX
(KA9Q, WAMPES, ... )
They all use the TNC as a simple modem (KISS-mode) and have TCP/IP protocol
implemented (using AX.25).
But the operator frontend is very poor, there are no virtual screens and
scroll back buffers.
So my intention was to write a program which has a powerful operator frontend
and uses the TNC not as a modem but as a Terminal Node Controller.
0.4 What's needed?
------------------
The program is developed for LINUX and a VT100-compatible terminal. It
further needs a TNC with WA8DED-software or The Firmware by NORD><LINK
connected to a serial port of the computer.
The Firmware by NORD><LINK is available for TNC2, all TNC2-clones and for
AEA PK232 and PK88. WA8DED-software is available for TAPR-TNC1.
Although LINUX is the development platform a porting to other UNIXes shall
be possible because no special functions are used. Other terminals can
be used if they have at least line insert and line delete and an entry
in /etc/termcap.
0.5 Mailbox program DPBox
-------------------------
Joachim, DL8HBS has written a very powerful packet radio program called
DigiPoint for ATARI computers. It contains a packet radio host terminal,
satellite calculations and a bulletin board system.
The BBS contains almost all features of the known BBS-systems and is capable
of performing store and forward with many other systems including packed s&f
with F6FBB-BBS's. In addition it can be filled by simply monitoring the
frequency. So you will get an up-to-date mailbox without transmitting
yourself.
So I decided to try a port of the BBS-part of DP to Linux. Joachim gave me
his Pascal-sourcecode and I translated it with P2C by Dave Gillespie
(contained in most Linux-distributions) to C. P2C did a terrific job,
thanks Dave! Only some minor prework at the sources was needed and P2C
created almost executable code. An unix socket interface was added on
both sides, TNT and DPBox and the first successful tests were performed.
Since then many improvements were done, but still it is not ready.
Some features are missing, some things were not carefully enough tested.
Therefore I have not included the DPBox source. The commands available in
TNT for using DPBox are described but only work together with a running
DPBox. If you are interested in taking part in the DPBox-development,
send me a mail.
1. Description
--------------
1.1 Virtual screens
-------------------
It is possible to operate several connection on the same frequency.
Therefore a virtual screen for every connection is implemented. It is
splitted to a part where all input is typed and a part where all received
data will be displayed. A statusline with all information about the
connection is located between these two parts.
To change parameters or give commands to the TNC a command screen is
available. To simplify operation all commands can be entered in the connect
screens, too by using a colon (:) as the first character.
It is possible to monitor all activity of other stations on the frequency.
To display these information a monitor screen is available.
Because only one real display is available the operator must choose which
of the several virtual screens he wants to see. He can switch between them
by using special codes or keys on the keyboard.
To see which screen and channel is active and to give global information a
statusline is displayed at the bottom of the screen.
All virtual screens (or the two parts of the connect screen) can be
configured larger than the real display on the screen. Therefore only a
small window of the virtual screen is displayed. The window can be moved by
the operator.
In addition there are some additional screens for special purposes.
A screen for the heard stations list, for the extended monitor feature,
for the online-help and for the box read generator.
If a link to DPBox ist active, there is a screen for the box operator-
console, too.
1.2 Main statusline
-------------------
The statusline at the bottom of the screen shows the main status of the
program. It shows the screen type (connect, command or monitor) and the
current channel. In addition any open file (send or receive) on the
current channel will be displayed.
In addition a 'P' will be displayed if the data output is paused,
a 'I' if insert mode is active. If the hostmode synchronisation is
lost a 'S' will be displayed. If the TNC was busy and a resend of data
from the computer is done, a 'B' will be displayed. If a routing script is
active a 'X' will be displayed.
If data is received on a channel which is not displayed the channel number
will be displayed until it is switched to the connect screen of this channel.
If a connection is active on a channel it is displayed by a '+' at the
channel position.
If a file is open on the displayed channel, a two-character file type
identifier and the filename (only last 14 charcters) will be displayed
in the statusline. Files which receive data will be displayed in the first
file field, files which transmit data will be displayed in the second file
field. The two-character file type identifier will be explained in the
file command chapter.
1.3 Keyboard-commands
---------------------
Notes:
The combination Alt and key generates the code <ESC>key in normal
console mode.
Under X the Alt-key is not supported in that way.
Therefore to activate for example the monitor screen with X you have
to type first <ESC> and then M instead of Alt-M.
(*1) : Input part of connect or mailbox screen.
(*2) : Command screen and input part of extended monitor screen.
(*3) : Monitor screen, receive part of connect, extended monitor or
mailbox screen.
(*4) : Command, boxlist, heard and help screen
(*5) : Only on monitor screen
1.3.1 Cursor movement and miscellaneous
---------------------------------------
CR, LF, <CNTL>M, <CNTL>J
The line from the beginning up to the cursor position is transmitted on
the current channel (*1) or will be transferred to the command interpreter
(*2). If the first character of (*1) is a colon (":"), the line will be sent
to the command interpreter (without the colon). A colon as the first
character of (*2) will be ignored and removed.
Arrow key left, <CNTL>S
Move the cursor one character to the left, if not on the start of the line
(*1,*2).
Arrow key right, <CNTL>D
Move the cursor one character to the right, if not on the end of the line
(*1,*2).
Arrow key up, <CNTL>E
Move the cursor one line up, if not on the top of the screen
(*1,*2,*4).
Arrow key down, <CNTL>X
Move the cursor one line down, if not on the bottom of the screen
(*1,*2,*4).
<CNTL>A
Move the cursor to the start of the line
(for command screen and input part of connect screen).
<CNTL>F
Move the cursor to the last non-space character of the line
(for command screen and input part of connect screen).
INSERT, <CNTL>N
Toggle insert-mode. If insert-mode is active a 'I' is displayed in the
statusline at the bottom. In normal mode all characters are overwritten,
in insert mode all characters from cursor position to the end of the line
will be shifted one position right (*1,*2).
DEL, <CNTL>H
Delete character left of cursor and move cursor one position left. If
insert-mode is active, all characters from cursor-position to the end of
the line is moved one position left (*1,*2).
<CNTL>L
The character at the cursor position will be deleted, all characters right
of the cursor up to the end of the line will be shifted one position left
(*1,*2).
<CNTL>Y
Delete all characters from the cursor position to the end of the line
(*1,*2).
<CNTL>V
The pass character. If for example you want to send cntl-T to the connected
station first type cntl-V and then a 'T'. A different attribute of the
character shows that it is a control character (*1).
1.3.2 Window movement and control
---------------------------------
<CNTL>R, Arrow key up (*5)
Move the display window of the virtual screen one line up, if not on top
of virtual screen (*3).
<CNTL>C, Arrow key down (*5)
Move the display window of the virtual screen one line down, if not on
bottom of virtual screen (*3).
Page up, <CNTL>W
Move the display window of the virtual screen one page up, if not on top
of virtual screen (*3,*4).
Page dwn, <CNTL>Z
Move the display window of the virtual screen one page down, if not on
bottom of virtual screen (*3,*4).
HOME
Move to the beginning of the window (*3,*4).
END
Move to the end of the window (*3,*4).
<CNTL>P, <ALT>P, <ESC>P
Toggle stop of data-output on the current screen, only possible on connect
and monitor screen. Stop is indicated by a 'P' in the statusline at the
bottom (Monitor screen and receive part of connect screen).
1.3.3 Screen switching
----------------------
F1 - F9
Switch to connect screen of channel 1 to 9.
F10
Switch to connect screen of channel 0 (unproto channel).
F11, <ALT>M, <ESC>M
Switch to monitor screen, if in monitor screen switch back to last
selected screen.
F12, <ALT>C, <ESC>C
Switch to command screen.
<ALT>Q, <ESC>Q
Switch to connect screen of current channel.
TAB, <CNTL>I
Select a new channel, a '?' as the channelnumber in the statusline
indicates this. A number between 0 to 9 for channels 0 to 9 or '@' for
channel 10 must be entered. If the extended monitor is active, the
channelnumber of the extended monitor channel (0 to 4) is selected
instead of the connect channel.
<ALT>X, <ESC>X
Switch to extended monitor screen.
<ALT>S, <ESC>S
Update heard stations list and display heard list screen.
<ALT>L, <ESC>L
Switch to box read generator (only if activated on current channel).
If already in read generator screen switch back to screen before
selection.
<ALT>B, <ESC>B
If DPBox is connected, switch to box operator console.
1.3.4 Keyboard macros
---------------------
<ALT>0 - <ALT>9, <ESC>0 -<ESC>9
User definable function keys for either text or commands.
1.4 Commands in command mode
----------------------------
1.4.1 TNC-commands
------------------
Most commands in hostmode consist of one character. It is difficult to
remember the charcter for a not often needed command. Therefore more verbose
command names were created for every TNC command. But it is still possible
to use the original command characters.
Only the known commands are implemented, if you have a TNC software which
has additional commands, the command TNC (see: 1.4.2.5.) must be used.
More information about the commands can be found in the documentation of
the TNC software (TNC commands of NORD><LINK The Firmware 2.6a). Some of
these commands are no longer existing in newer versions (TF 2.7).
DAMAdis,"B" : DAMA timeout
Version,"V" : Shows version of TNC-software
CHeck,"@T3" : Connection timer T3
Connect,"C" : Start connection
CText,"U" : Response text if connect is received by TNC
DIGIpeat,"R" : Digipeat function
Disconne,"D" : End connection
DAYTIme,"K" : Time and date functions
Frack,"F" : Start value of round trip timer for retry timing
FUlldup,"@D" : Fullduplex on modem side
MAXframe,"O" : Maximum number of outstanding packets
Monitor,"M" : Frequency monitor functions
MYcall,"I" : Callsign of the local operator
With MYCALL the call sign is set permanently on this
channel, with "I" only up to the next disconnect.
A permanent MYCALL can be removed by using "$" as call
sign.
Persist,"P" : Persistance value for transmitter keyup
RESptime,"@T2" : Delay before Info-frame will be confirmed (timer T2)
REtry,"N" : Maximum number of retries
SLottime,"W" : Slottime value for transmitter keyup
Txdelay,"T" : Time after transmitter keyup to sending of data
USers,"Y" : Number of channel open for connection
Xmitok,"X" : Locking of transmitter
BUFfers,"@B" : Free buffers of TNC
A1SRTT,"@A1" : A1-value for smoothed round trip timer
A2SRTT,"@A2" : A2-value for smoothed round trip timer
A3SRTT,"@A3" : A3-value for smoothed round trip timer
IPOll,"@I" : Packet length up to which I-Poll mode is used
VALcall,"@V" : Check callsign in connect command
All verbose commands can be abbreviated, the upcase part is mandatory.
1.4.2 External commands
-----------------------
Most of the commands can be abbreviated, the upcase part of the command
is mandatory.
1.4.2.1 Saving data to files
----------------------------
LOGQso <filename>
A file will be openend and all transmitted and received data on the
selected channel will be saved.
If no directory was specified, the file will be stored in 'download_dir'.
If 'download_dir' is empty, the current directory is used. A CR will be
translated to a LF and control-codes will be translated to ^X.
Umlaut-conversion will be done, too. The file type ID is 'RN',
receive normal.
LOGRec <filename>
Same as LOGQSO but only received data will be saved.
The file type ID is 'RN', receive normal.
LOGSnd <filename>
Same as LOGQSO but only transmitted data will be saved.
The file type ID is 'RN', receive normal.
READ <filename>
A file will be openend and all received data will be saved.
If no directory was specified, the file will be stored in 'download_dir'.
If 'download_dir' is empty, the current directory is used. Only a CR to LF
translation is done. READ shall be used to receive 7PLUS files.
The file type ID is 'RP', receive plain.
READBin <filename>
Same as READ but no translation of characters is done.
The file type ID is 'RB', receive binary.
READAbin <filename>
Start receiving a file using the AutoBIN-protocol.
If no directory was specified, the file will be stored in 'download_dir'.
If 'download_dir' is empty, the current directory is used.
The file type ID is 'RA', receive AutoBIN.
LOGAbin <filename>
Same as READABIN except that at the end of transmission the transfer
statistics are only displayed, but not sent (useful for receiving binary
files from BBSs which get confused by the statistics).
The file type ID is 'RQ', receive AutoBIN, quiet mode.
CLose
Close the active receive-file.
LOGMon <filename>
A file will be openend and all received data on the monitor screen will be
saved. If no directory was specified, the file will be stored in
'download_dir'. If 'download_dir' is empty, the current directory is used.
A CR will be translated to a LF and control-codes will be translated to ^X.
Umlaut-conversion will be done, too.
The file type ID is 'RN', receive normal.
RDMON <filename>
Same as LOGMON but only a CR to LF translation is done.
The file type ID is 'RP', receive plain.
RDMONBin <filename>
Same as RDMON but no translation of characters is done.
The file type ID is 'RB', receive binary.
CLOSEMon
Close the active receive-file on the monitor screen.
LOGXmon <filename> (on extended monitor screen)
LOGXmon <xmon-channel> <filename> (on other screens)
A file will be openend and all received data on the current (on extended
monitor screen) or on the specified (on other screens) extended monitor
channel will be saved.
If no directory was specified, the file will be stored in 'download_dir'.
If 'download_dir' is empty, the current directory is used. A CR will be
translated to a LF and control-codes will be translated to ^X.
Umlaut-conversion will be done, too.
The file type ID is 'RN', receive normal.
RDXMON <filename> (on extended monitor screen)
RDXMON <xmon-channel> <filename> (on other screens)
Same as LOGXMON but only a CR to LF translation is done.
The file type ID is 'RP', receive plain.
RDXMONBi <filename> (on extended monitor screen)
RDXMONBi <xmon-channel> <filename> (on other screen)
Same as RDXMON but no translation of characters is done.
The file type ID is 'RB', receive binary.
CLOSEXmo (on extended monitor screen)
CLOSEXmo <xmon-channel> (on other screens)
Close the active receive-file on the current (on extended monitor screen)
or on the specified (on other screens) extended monitor channel.
APPend [ON/OFF]
Flag if data shall be appended to existing files
(only valid for LOGQSO, LOGREC, LOGSND, LOGMON and LOGXMON).
AUTOBIn [ON/OFF]
Flag if AutoBIN-receive shall start autonomously on reception of a valid
AutoBIN-Header (AutoBIN-receive is performed in quiet mode like started
with LOGABIN-command).
1.4.2.2 Sending files
---------------------
SEND <filename>
Send a file on the selected channel, a LF will be translated to CR.
If no directory was specified, the file will be fetched from 'upload_dir'.
If 'upload_dir' is empty, the current directory is used.
SEND shall be used to send 7PLUS files.
The file type ID is 'TP', transmit plain.
SENDLog <filename>
Same as SEND but control-codes will be translated to ^X and
Umlaut-conversion will be done.
The file type ID is 'TN', transmit normal.
SENDBin <filename>
Same as SEND but no LF to CR translation.
The file type ID is 'TB', transmit binary.
SENDAbin <filename>
Send a file using the AutoBIN-protocol.
If no directory was specified, the file will be fetched from 'upload_dir'.
If 'upload_dir' is empty, the current directory is used.
The file type ID is 'TN', transmit autoBIN.
BReak
Abort sending of a file.
1.4.2.3 Shell,Run and redirect
------------------------------
SHell [trans]
(This command is available only if TNT is invoked by root.)
Open a shell on the current channel.
All received data on the current channel will be sent to the shell, all
data from the shell will be sent on the current channel. If no parameter
is specified, all linefeed-characters (0x0A) sent by the shell will be
translated to carriage return (0x0D). All carriage return characters
received from the remote station will be translated to linefeed (0x0A)
prior to sending to the shell.
The parameter 'trans' disables this conversion, all characters will be
sent transparently.
ENDShell
End the shell on the current channel.
RUN <program>
On the current channel the specified program will be executed.
All received data on the current channel will be used as standard input
of the program, all data sent to standard output by the program will be
sent on the current channel. Only programs contained in 'run_dir' can be
executed.
All linefeed-characters (0x0A) sent by the program will be translated to
carriage return (0x0D). All carriage return characters received from the
remote station will be translated to linefeed (0x0A) prior to sending
to the program.
RUNT <program>
Same as RUN, but no conversion of linefeed and carriage will be done
(like SHELL with parameter 'trans').
ENDRun
Abort execution of the program on the current channel.
REDir <device>
Redirection of input/output.
All received data on the current channel will be sent to <device>, all
data received from <device> will be sent on the current channel.
ENDRedir
End the redirection of the current channel.
SOCket <portnumber>
On the current channel a server is started which accepts connections on
an internet socket with the specified portnumber.
ENDSock
End the socket server on the current channel.
1.4.2.4 Directory
-----------------
CD <dir>
Change the working directory to <dir>. If <dir> is empty, the
HOME-directory will be used.
CWD
Displays the current working directory.
1.4.2.5 Miscellaneous
---------------------
TNC <command>
<command> is sent as a command to the TNC without any conversion.
CHANnel <x> or S <x>
Switch to connect screen of channel x.
If included in a command script, no changing of screens is performed,
it simply specifies the channel used for the following commands.
XConnect <callsign>
Start of a routing script for the specified callsign, more info can be
found in 2.6 . An active script can be ended by using 'OFF' as callsign.
If a routing script is active, a 'X' in the main statusline will be
displayed.
CONCall <callsign>
If the updated callsign in the statusline is corrupted by a connect
message in normal text, the callsign can be restored using this command.
SENDCom <filename>
Execute a file containing TNC or external commands (command script).
CBell [ON/OFF]
Beep if the state of a connection changes (connect bell).
INFObell [ON/OFF]
Beep if a new packet is received on any channel (information bell).
COOKie [ON/OFF]
Send a cookie if connected from a remote station.
REMote [ON/OFF]
Availability of remote commands.
UMLaut [ON/OFF]
Umlaut conversion. (see 2.2)
CONText [ON/OFF]
Send a special connect text, using macros (see 2.5), overrides COOKIE.
TXEcho [ON/OFF]
Echo all sent data from input part to part with received data.
PTYEcho [ON/OFF]
Echo all data received and send on a channel on which SHELL, RUN, SOCKET
or REDIR is active.
NAME <name>
Set the name of the call on the current channel to <name>, if <name> is
not specified, the stored name is displayed (only if channel connected).
STIme
Send time and date on the current channel.
SCOokie
Send a cookie on the current channel.
TIMESET
Send time of computer to TNC.
DATESET
Send date of computer to TNC.
RESYnc
Displays the number of hostmode resynchronisations since program start.
XMON [ON/OFF]
Enables or Disables the extended monitor function. If disabled, received
monitor frames are not analysed any longer.
LAYer3 [ON/OFF]
Enables or disables the analysis of NETROM/TheNet headers (pid CF) in
monitored frames.
HEArd [ON/OFF]
Enables or Disables the heard list. If disabled, the heard list is not
updated any longer.
KMAcro
Reload the keyboard macro file 'func_key_file' defined in the init-file.
MSEnd <filename>
Send a file, using macros (see 2.5). The file is fetched from
'macrotext_dir' defined in the init-file.
EXit
Leave TNT.
1.4.2.6 Extended monitor and boxlist
------------------------------------
EXTmon <call1> <call2> [<call3> <call4>] (extended monitor screen)
EXTmon <xmon-channel> <call1> <call2> [<call3> <call4>] (other screens)
On the current (extended monitor screen) or on the specified (other
screens) channel a connection shall be monitored.
If only <call1> and <call2> is specified, frames from <call1> to <call2>
and <call2> to <call1> are monitored, otherwise frames from <call1> to
<call2> and <call3> to <call4>.
EXTAmon <call1> <call2> [<call3> <call4>]
Same as EXTMON except that the next free xmon-channel will be used.
The resulting channel will be displayed as command response.
ENDEXtm (extended monitor screen)
ENDEXtm <xmon-channel> (other screens)
The extended monitor on the current (extended monitor screen) or the
specified (other screens) channel will be closed. The connection will
be no longer monitored.
LOGBlist
On the current channel or on the mailbox screen a file is openend and
all received data is saved. The command is similar to LOGREC except
a unique filename is generated (in /tmp directory) and the file will
be removed during exit of TNT.
BLIst
On the current channel or on the mailbox screen the last active file
is used for the boxlist screen and feature. If the file is not closed
up to now, it will be closed.
XBList
Finish boxlist and close the boxlist screen on the current channel.
1.4.2.7 Interface commands
--------------------------
IFAce <socket-name>
Build up a socket connection to an external program via an UNIX-socket
<socket-name>.
ENDIFace <socket-name>
Disconnect the socket connection to an external program via an UNIX-socket
<socket-name>.
FINIFace <socket-name>
Same as ENDIFACE, except that the external program get the command to
terminate its execution.
ACTIf <socket-name>
Activate the external program on the current channel using the already
built up socket connection.
DEACtif <socket-name>
Deactivate the external program on the current channel.
1.4.2.8 DPBox-interface commands
--------------------------------
ACTBox
Build up a socket connection to DPBox via an UNIX-socket specified
by 'box_socket' in the init-file.
DEACTBox
Disconnect the socket connection to DPBox.
FINBox
Disconnect the socket connection to DPBox and terminate DPBox.
BOX
Activate DPBox on the current channel using the already built up
socket connection.
ENDBox
Deactivate DPBox on the current channel.
AUTOBOx [ON/OFF]
If activated, all connections are scanned for mail-headers. A valid
mail-header leads to saving the following mail. If the end is reached,
the mail will be sent via the interface to DPBox.
MONBox [ON/OFF]
If activated, all monitored frames are scanned for mail-headers.
A valid mail-header leads to an extended monitoring of the connection.
If no frames are lost and the mail-end is reached, the monitored mail
will be sent via the interface to DPBox.
LMONbox
All mails which are currently received using the MONBOX-feature are
displayed.
1.4.2.9 Password generation commands
------------------------------------
PRIV
This command starts the password generation sequence. The command is
rejected if the channel is not connected or the callsign of the connected
station is not contained in 'tnt_pwfile'.
The taken action is dependent on the type of the password generation
defined for the callsign.
LISTPRIV
This command lists all callsigns for which an entry in 'tnt_pwfile'
was found. In addition for every callsign the type of password generation
and the file containing the password data is listed.
LOADPRIV
If 'tnt_pwfile' was changed while TNT is running, it can be reloaded
with this command. A reload is necessary because TNT only reads the
password file at startup and copies the data to memory.
2. Special features
-------------------
2.1 Remote commands
-------------------
If remote is enabled (command REMOTE) the remote station can give some commands
to the program. All remote commands start with a double slash '//'. This double
slash must be entered directly at the beginning of a line, otherwise the
command is not accepted.
The following remote commands are recognized:
//NAME <name> Store name in database
//SHELL [trans] Start a UNIX-shell session
//RUN <program> Execute a program
//RUNT <program> Execute a program without CR/LF translation
//RUN Directory of all available programs
//BOX Start DigiPoint Box
//COOKIE Send a cookie
//DIR <filter> Show directory
//DIRLONG <filter> Show directory in long format
//FREE Shows space on disks
//INFO Info about station
//HELP This help-information
//NEWS Display news about this station
//READ <file> Read a file
//BREAK Abort reading file
//WRITE <file> Write file to disk
//CLOSE End writing file
//WPRG <file> Write file to disk using AUTOBIN-protocol
//WPRG <file> <rfile> Same as above, but send back //RPRG <rfile>
//RPRG <file> Read a file using AUTOBIN-protocol
//RPRG <file> <rfile> Same as above, but send back //WPRG <rfile>
//VERSION Show version of software
//ECHO <string> Send back string
//TIME Send time
//QUIT Disconnect
//DISC Disconnect
2.2 Umlaut conversion
---------------------
2.2.1 Display
-------------
If the LINUX-console control codes are used, for a display on the screen
the IBM-characterset is used. No umlaut-conversion will be done.
If termcap is used a received IBM-umlaut is converted depending on UMLAUT.
If UMLAUT is on, the IBM-umlaut is converted into the 8-bit Latin-1 umlaut.
If UMLAUT is off, it is converted to a two character representation ("ae").
2.2.2 Sending text
------------------
If UMLAUT is off, all entered umlauts are converted to a two character
representation ("ae"). If UMLAUT is on, umlauts will not be converted and
sent as an IBM-umlaut.
2.2.3 File-receive
------------------
Only log-files (LOGREC, LOGSND, LOGQSO, LOGMON and LOGXMON) are affected
by umlaut conversion. If UMLAUT is on, the IBM-umlaut is converted into
the 8-bit Latin-1 umlaut. If UMLAUT is off, it is converted to a two
character representation ("ae").
2.2.4 File-send
---------------
Only log-files (SENDLOG) are affected by umlaut conversion.
If UMLAUT is on, the 8-Bit Latin-1 umlaut is converted into the IBM-umlaut.
If UMLAUT is off, it is converted to a two character representation ("ae").
2.3 Using UNIX-features
-----------------------
2.3.1 Shell-login and Redirection
---------------------------------
TNT allows a remote user to log into UNIX as a normal user. All received
data is treated as shell input, all data from the shell is transmitted to
the remote station.
To use the shell-login it is necessary to invoke TNT by the superuser root.
Otherwise the shell-login is disabled.
The shell can be started by the operator using command SHELL or by the
remote station using command //SHELL.
It is possible to execute all programs which are permitted to use from
the shell.
At login time, it is checked, if the callsign of the remote station is
a valid user-id. If it does not exist, depending on 'unix_new_user' in
the initfile a new user-id is created or the user-id specified by
'remote_user' is used.
In all cases the callsign is stored on the environment variable 'CALLSIGN'.
If you start a shell on a remote system, all programs which need a special
terminal lead to problems in the screen output. Therefore it is possible
to redirect to a virtual console (or any other device, file, pipe, e.t.c.).
The control codes for a terminal are interpreted correctly by the virtual
console and all data entered will be transmitted.
Using this feature screen oriented programs can be executed on the remote
system using TNT as transport medium.
If you want to use this feature be sure to give parameter 'trans' with the
SHELL command. Otherwise there will be a linefeed/carriage return conversion
active which lead to problems using screen oriented programs.
To increase performance, for shell and redirection all data from the shell
or the redirection console will be buffered.
This means that data is not sent directly, but if the buffer contains 256
Bytes (the AX25 maximum packetlength) or if for a specific time no new
characters were received. This time can be configured in the initialisation
file.
2.3.2 Running programs
----------------------
For users who are not familiar with UNIX, the use of a shell is quite
complicated. Therefore a RUN command is implemented, which will execute a
specified program using a shell.
If you don't like running TNT under root-permissions and therefore the
shell-login is disabled, the RUN command allows to execute specific programs
by a remote station.
A special directory 'run_dir' contains all executable programs. Programs
in other directories cannot be executed by this command.
Because no login is performed, the program is executed using the default
user specified by 'remote_user'.
If TNT was invoked not by the superuser root, the user can't be changed.
In this case the program is executed under the permission of the userid
from which TNT was started.
The callsign of the user is stored in the environment variables 'CALLSIGN'
and 'LOGNAME'.
In most cases it is wanted to translate the UNIX-linefeed to Packet-Radio
carriage return and vice versa. If no translation of the characters sent
and received by the program shall be done, the command RUNT must be used.
2.3.3 Socket interface
----------------------
If your system is used by several people or is part of a network, you may
want to give access to Packet Radio to these users.
To achieve this, the socket interface is implemented. With the command
SOCKET <portnummer> a server is installed at an internet socket with the
specified portnumber. Now a local user can connect to this server with
'telnet localhost <portnumber>'. Then a login with callsign and password
is executed. After a successful login one channel of the TNC can be used for
Packet Radio connections.
The login information is kept in sock_passfile and is independent of the
passwd file.
2.4 AutoBIN: File transfer
--------------------------
To transfer binary files easily without much overhead but with a security
check, the AutoBIN-'protocol' was defined.
It is implemented in many PR-programs. Therefore it is implemented in TNT,
too. To use AutoBIN the commands SENDABIN, READABIN and LOGABIN are available
for the operator and //WPRG and //RPRG for a remote user. In addition with
AUTOBIN the protocol is autonomously started after reception of a valid
AutoBIN-header.
At the end of a successful transfer the elapsed time and the effective
Baudrate is displayed. If a file was received, the received checksum and the
calculated checksum will be displayed, too. Normally these statistical
information will be send to the remote station, too. In case of LOGABIN or
AUTOBIN enabled the statistical information will only be displayed (to avoid
confusion of some BBSs).
If the transfer was aborted, the connection was disconnected or the
calculated checksum is not equal to the received checksum, the received file
will be moved to a special directory (abin_dir). In addition the name is
changed to a unique name. From time to time it is needed to clean up this
directory.
Although in most cases these corrupted files are of no interest, for the
rare cases where they are needed they are kept in this directory.
2.5 Special connect text and files with macros, Name-database
-------------------------------------------------------------
To be able to send a special connect text to a connecting station, macros
can be included in the connect text file.
The connect text file will be sent on a connect if CONTEXT was set to ON.
For default the connect text file (tnt_ctextfile) in the tnt directory
will be used, but you can put for some users a personal connect text in
the connect text directory (ctext_dir). The file must be named
<callsign>.ctx .
In addition a file containing macros can be sent every time you like,
not only on connect (command MSEND). All these files must reside in
the macro text directory 'macrotext_dir'.
To be more personal and to help remembering the name of the operator of the
remote station a name database is included.
A name can be entered by the operator using the NAME command or with //NAME
given by the remote station.
If no name is specified after the command, the current name will be
reported.
Following macros are expanded, if found in a connect text or macro file:
%v: Version of TNT running
%c: Call of other station
%n: Name of other station (extract from names database)
%y: Call of own station
%k: Channel number
%t: Current time
%d: Current date
%b: Bell (^G)
%i: Include news-file ('news_file_name')
%z: Timezone
%_: CR/LF
%o: Include a cookie
%?: Send a message if name of other station not contained in
names database
%%: '%' itself
2.6 Routing scripts
-------------------
The structure of the Packet Radio Network is quite different compared to
the internet. In the internet you can directly specify your destination and
the routing will be done automatically.
In the Packet Radio Network there exist different systems with incompatible
routing mechanisms. To connect to a destionation there may be needed several
steps. Suppose the following example:
You want to connect DL7ZZZ which is standby on the frequency of the digi-
peater DB0LUC. Your local digipeater is DB0BLO.
Therefore your first command is to connect DB0BLO (:c db0blo). If the link
setup was successful you will send the line 'c db0ber' to the digipeater
which then will build up a connection to DB0BER, which is the next digi-
peater towards DB0LUC. If the connection is established, DB0BLO will send
you the message: '*** connected to DB0BER'.
Now you enter the line 'c db0luc db0bln', which means DB0LUC can be reached
from DB0BER via DB0BLN. DB0BLN is not connected, because it uses hop-to-hop
acknowledge instead of simple digipeating.
Now if the connection was successful, you get the line
'BSUED:DB0BER> Connected to DB0LUC via DB0BLN' and you can at last try to
connect your destination with the line 'c dl7zzz'. The successful connection
is indicated by the line '*** connected to DL7ZZZ'.
If you do this manually, you must look at your screen and after each
successful connect-message you must enter the new line.
The connect-script facility (command XCONNECT) now does all these steps
automatically, if you have given the routing information to the program.
The routing information will be searched in the names-database file
(name_file_name) and reads for the example as follows:
T>DL7ZZZ Joe; N>DB0LUC T>DL7ZZZ
N>DB0LUC Digi Luckau; N>DB0BER F>DB0BLN N>DB0LUC
N>DB0BER Digi Tempelhof; N>DB0BLO N>DB0BER
N>DB0BLO Digi 9K6
As you can see the routing entries are recursive, you don't have to specify
the whole routing for the destination.
The characters before the callsigns give the information to the connect
script shall connect the digipeater ( N> ) or if the digipeater shall be
used in the via path ( F>, D> ).
To identify a normal user T> is used, for mailboxes B> can be used.
Some programs used by normal users allow a connect with the command
//c <callsign>. If you want to use such a user as part of your path,
put a T> in front of the callsign and a '//c <callsign>'-line will be
send by the routing script.
2.7 Call update
---------------
If you use routing scripts or if you connect manually through a large
number of digipeaters, you easily loose the orientation, where you are.
Therefore, every 'connected to' line will update the callsign displayed
in the statusline.
'reconnected to' lines will update the call in the statusline, too, but
routing scripts will not send the next command line and the logbook call
will not be updated.
If the callsign is changed by a 'connected to' string in normal text,
it can be restored by using the CONCALL command.
2.8 Logbook
-----------
All connections performed by the station are written into a logbook-file.
Each line contains starttime and endtime of the connection and the callsign
of the remote station. If the destination was connected directly only this
call is logged, if the destination was connected using several digipeaters
or by a routing script, the first digipeater used is logged, too.
The name of the logfile can be specified in the init-file (tnt_logbookfile).
Example:
Starttime | Endtime | Callsign
-------------------------------------------------------------------------------
16.03.94 18:08 | 16.03.94 18:09 | DB0BLO
17.03.94 21:32 | 17.03.94 21:37 | GEHREN:DB0LUC, Uplink: DB0BLO
2.9 Keyboard macros
-------------------
With the keyboard macro feature some often used commands or texts can be
executed or sent by only one keycode.
You may define up to 10 keycodes (<ALT>0 to <ALT>9 or <ESC>0 to <ESC>9)
with either text patterns or TNT commands in a file specified by
'func_key_file' in the init-file.
Each line has to begin with a two digit number specifying the keycode and
a colon. (01: for <ALT>1 / <ESC>1, 10: for <ALT>0 / <ESC>0).
A text line must follow directly after the colon. If the last character
of the line is an asterisk '*' a CR will be sent instead of it, otherwise
no CR will be sent.
A command must be preceeded by an additional colon, a CR is always appended
to the command line.
The length of the text or command must not exceed the length of the line.
If the length of one line is not sufficient for your text or you want to
send a text containing macros like time and callsign, you must specify the
commands 'send' or 'msend' instead of a textline. The keyboard macro file
is loaded at startup. If you change this file during execution of TNT, you
can reload the file with the command 'kmacro'.
2.10 Boxlist
-----------
2.10.1 General description
-------------------------
If you get a list of files from a BBS, you will have to write down the
files you are interested in or you must store the list in a file and look
through this file afterwards. In both cases you have to type the filename
or number of the file to get it from the BBS.
The boxlist-feature allows to fetch a file from the BBS by selecting the
file (with cursor keys) from the filelist and simply pressing CR.
2.10.2 Using boxlist
--------------------
How does it work?
a. Before requesting the filelist open a logfile. If you are not interested
in keeping the list, simply use the command 'logblist'. A temporary file
with a unique name will be used. This file will be erased when you exit
TNT. If you want to keep the list, use 'logrec <filename>'.
b. If the end of the filelist is received, use the command 'blist'.
This command closes the logfile and loads it into the boxlist screen.
If no file was open the last logfile on the current channel will be
loaded into the boxlist screen.
c. Use <ALT>L or <ESC>L to toggle connect and boxlist screen. In boxlist
screen you can use the cursor commands to select a file. Pressing CR
will send a read command to the BBS. All already fetched files will be
displayed with a different attribute.
d. If you have read all files from the filelist you can close the boxlist
screen by the command 'xblist'.
2.10.3 Using keyboard macros
----------------------------
To use the boxlist feature without typing in the commands, it is advisable
to use keyboard macros. For example:
<ALT>8 / <ESC>8 : 'logblist'
<ALT>9 / <ESC>9 : 'blist'
<ALT>0 / <ESC>0 : 'xblist'
These keyboard macros are already included in the sample keyboard macro
file.
2.10.4 Recognized formats
-------------------------
At the moment the following list formats are recognized:
a. DIEBOX check
7 DL4BCU > TERMINE...16 24.09.94 DL 2214 5 2m Mobilfuchsjagd I05 08.
-> R TERMINE 16 +
b. DIEBOX list
263 DL1ZAX 02.11.94 18:03 6763 DL-RUNDSPRUCH NR. 39/94
-> R 263 +
2.11 Extended monitor
---------------------
The extended monitor feature allows the monitoring of specific connections
on the frequency with automatic removal of headers and resent packets.
There are 5 (0 to 4) different extended monitor channels available.
<ALT>X or <ESC>X will switch to the extended monitor screens and TAB can
be used to change the channel.
The command EXTMON is used to activate the extended monitor. If you have
given the command from an extended monitor screen, the current channel will
be taken. On other screens you must give the channel number as an additional
parameter before specifying the callsigns.
The next free extended monitor channel will be taken if the command EXTAMON
is used.
As command parameters you have to specify the callsigns of the connection
you want to monitor. Normally this will be 2 callsigns and both directions
will be monitored (in different attributes).
Using digipeaters like NETROM/TheNet or RMNC/Flexnet a connection is build
up out of 2 connections. First the connection from station 1 to the
digipeater (DL9xxx <> DB0xxx) and second the connection from the digipeater
to station 2 (DL9xxx-15 <> DG1xxx). In most cases you can only monitor frames
sent by the digipeater. In this case you can specify 4 callsigns
(DB0xxx DL9xxx DL9xxx-15 DG1xxx) and both directions of the connection will
be monitored in the extended monitor screen.
The extended monitoring can be finished by the ENDEXTM command.
2.12 Use of DPBox
-----------------
2.12.1 General description
--------------------------
DPBox is a daemon which is totally independent of TNT. The daemon must
be activated before using any of the DPBox-commands of TNT.
2.12.2 Using unix socket interface
----------------------------------
To build up the connection from TNT to DPBox the command 'actbox' must
be used. If the connection shall be closed 'deactbox' must be used.
The command 'finbox' not only closes the connection like 'deactbox', it
gives a termination command to the DPBox daemon.
The unix socket name of DPBox must be defined in 'box_socket' in the
initfile.
2.12.3 Mailbox screen
---------------------
If the connection to DPBox is activated, the mailbox screen (<ALT>B or
<ESC>B) can be used as a sysop-console by executing the 'box' command.
You can either 'quit' or give the command 'endbox' to end your sysop-
session.
All features of a normal connect screen are provided including the boxlist.
In boxlist mode there is an additional feature. If you select a file and
press 'e' instead of CR, the file will erased. 'k' for kill and 'l' for
list are available, too.
2.12.4 Using DPBox via Packet Radio
-----------------------------------
DPBox can be activated on a normal connect channel by the command 'box',
by the remote command //box or by connecting a channel which SSID of the
callsign is equal to 'tnt_box_ssid' in the initfile.
The 'endbox' command, 'quit' to the box or a disconnect will terminate
the box-session.
2.12.5 Autobox and monbox feature
------------------------------------
If you set 'autobox' to on, all mails you will receive on any channel
will be sent to DPBox and will be stored in the corresponding board.
This includes personal mail and bulletins.
If you set 'monbox' to on and 'xmon' is on, all monitored frames will be
searched for mail headers. If one is found, it is tried to receive the
whole mail similar to the extended monitor function. If packets are lost
or if any other error occurs, the mail is not accepted.
If the mail was correctly received it will be sent to DPBox and will be
stored in the corresponding board.
All bulletins and all personal mail which contains a callsign out of
'autobox_dir' as sender or receiver will be treated in this way.
All mails which will currently be received can be displayed with the
'lmonbox' command.
2.13 Automatic password generation
----------------------------------
2.13.1 General description
--------------------------
In the packet radio network many different password systems are used at
the moment. Therefore a configuration file 'tnt_pwfile' is provided.
In this file for any callsign including SSID a password type and a file
containing the password can be defined. Depending on the password type
a different action is taken and the contents of the password file are
different.
Up to now only very few password systems (in fact only one :-) ) are
implemented in TNT, but it is planned to increase the number of supported
systems. If you have added any password system, please contribute!
2.13.2 DIEBOX
-------------
If the password type is DIEBOX, after a connect to the specified callsign
was done, every text is scanned for the string 'Login: '. If the string
was found, the following date and time is recorded and the scan for the
string will be stopped.
If you invoke the command 'priv', a 4 character password will be generated
out of the logintime and your password file and as a result 'PRIV xxxx' will
be sent (xxxx stands for generated password).
The password file must be identical to the file used by DIEBOX, it MUST
contain CR and LF between every line.
3. Installation
---------------
3.1 Configuration file
----------------------
The configuration of the program is done by a configuration file.
This file called 'tnt.ini' is searched at the current directory or at the
home directory of the user (other filenames can be specified by using the
-i option at startup).
sample tnt.ini:
# device to which TNC is connected
device /dev/cua0
# lockfile for device
tnt_lockfile /usr/spool/uucp/LCK..cua0
# baudrate used
speed 19200
# username for remote permissions
remote_user guest
# first user-id for new users
unix_first_uid 410
# group-id for new users
unix_user_gid 101
# generation of new users
unix_new_user 1
# timeout packet assembly for SHELL/REDIR (seconds)
pty_timeout 2
# maximum number of entries in heardlist
num_heardentries 100
# expansion of R:-headers in boxlist read command
blist_add_plus 0
# SSID of DPBox
tnt_box_ssid 7
# tnt directory
tnt_dir /work/tnt/
# remote directory
remote_dir /work/tnt/remote/
# ctext directory
ctext_dir /work/tnt/ctext/
# directory for corrupt autobin-files
abin_dir /work/tnt/abin/
# directory for uploads
upload_dir /work/tnt/up/
# directory for downloads
download_dir /work/tnt/down/
# directory for executable programs
run_dir /work/tnt/bin/
# upfile
tnt_upfile tnt.up
# downfile
tnt_downfile tnt.dwn
# infofile
rem_info_file tntrem.inf
# helpfile
rem_help_file tntrem.hlp
# tnthelpfile
tnt_help_file tnt.hlp
# cookiefile
tnt_cookiefile /work/cookie/cookies.doc
# namesfile
name_file_name names.tnt
# newsfile
news_file_name news.tnt
# connect text
tnt_ctextfile ctext.tnt
# logbook file
tnt_logbookfile log.tnt
# password file
tnt_pwfile pw.tnt
# resync logfile
resy_log_file /work/tnt/resy.log
# socket passwordfile
sock_passfile netpass.tnt
# home-dir for new users
unix_user_dir /work/tntusers/
# file for keyboard macros
func_key_file fkeys.tnt
# dir for macro-texts
macrotext_dir /work/tnt/macro/
# socket for digipoint box
box_socket /work2/box/system/socket
# directory for newmail
newmaildir /work2/box/newmail/
# file holding monitored folders
autobox_dir /work/tnt/autobox.dir
# number of lines for backscroll
# command-screen
lines_command 40
# monitor-screen
lines_monitor 400
# input area of connect-screens
lines_input 20
# output area of connect-screens
lines_output 100
# input/output-lines ratio on real screen (connect)
scr_divide 5
# input area of mailbox-screen
lines_mbinput 20
# output area of mailbox-screen
lines_mboutput 1000
# input/output-lines ratio on real screen (mailbox)
mbscr_divide 8
# output area of extended monitor screens
lines_xmon 100
# input area of extended monitor screens
lines_xmon_pre 10
# input/output-lines ratio on real screen (extended monitor)
xmon_scr_divide 5
# use color attributes
color 1
# don't use termcap
termcap 0
# attributes for color
# normal characters
attc_normal 0x07
# characters in bottom statusline
attc_statline 0x10
# characters in monitor-headers
attc_monitor 0x06
# characters in channel statusline
attc_cstatline 0x1F
# control-characters
attc_controlchar 0x0F
# remote-answers
attc_remote 0x06
# attributes for monochrom
# normal characters
attm_normal 0x00
# characters in bottom statusline
attm_statline 0x08
# characters in monitor-headers
attm_monitor 0x10
# characters in channel statusline
attm_cstatline 0x10
# control-characters
attm_controlchar 0x10
# remote-answers
attm_remote 0x10
<EOF>
3.1.1 Serial and general configuration
--------------------------------------
'device' : Device, to which the TNC is connected, must be specified.
'speed' : Baudrate of the serial port
'tnt_lockfile' : Filename to lock the port
'num_heardentries': Number of entries in heardlist.
'blist_add_plus': If not set to 0, a '+' is appended to the boxlist read
command. As a result the mail will contain full R: lines.
'tnt_box_ssid' : If the own call on the current channel is equal to this
ssid, DPBox is started on connect.
3.1.2 Security
--------------
'remote_user' : User-Id for remote access.
If TNT was started by root, prior to every remote file command the
user-id is changed to restrict the file permissions of the remote user.
If TNT was started by a normal user, the user-id is not changed. Therefore
a remote user has the same file permissions as the user himself.
'unix_new_user' : 1: A new user gets an entry in /etc/passwd and a
directory is created.
0: A new user is logging in as specified in 'remote_user'.
'unix_first_uid': First user-ID which will be taken for new users.
'unix_user_gid' : Group-ID used for new users.
3.1.3 Directories and Files
---------------------------
'tnt_dir' : Directory which contains tnt-files
'remote_dir' : Directory used for remote access
'ctext_dir' : Directory used for personal connect texts
'abin_dir' : Directory for files of unsuccessful AutoBIN-transfers
'upload_dir' : Directory for sending files (SEND/SENDLOG/...) if no
directory was specified.
'download_dir' : Directory for receiving files (READ/LOGQSO/...) if no
directory was specified.
'run_dir' : Directory for executable programs (//RUN).
'unix_user_dir' : Root-directory for directories of new users.
'macrotext_dir' : Directory for files containing text-macros (MSEND).
'newmaildir' : Directory where mails read by AUTOBOX and MONBOX
are stored for DPBox.
'tnt_upfile' : Command script executed at startup of program
'tnt_downfile' : Command script executed before exit of program
'rem_info_file' : File transmitted if remote command //info is received
'rem_help_file' : File transmitted if remote command //help is received
'tnt_help_file' : File which is displayed if help screen is selected
'tnt_cookiefile' : File which contains database for fortune cookies
'tnt_logbookfile': File for logbook
'tnt_pwfile' : File for generation of passwords
'name_file_name' : File for names database and routing scripts
'news_file_name' : File for news message, transmitted if //news is received
or if %i macro is found in a connect text file
'tnt_ctextfile' : File containing common connect text
'resy_log_file' : Logfile if a resync occured
'sock_passfile' : Socket login database
'func_key_file' : Definition of keyboard macros
'box_socket' : Path and name of the UNIX-socket used for connection
to DPBox.
'autobox_dir' : File containing boards which shall be monitored using
MONBOX-feature.
All files except 'tnt_cookiefile', 'resy_log_file' and 'autobox_dir' are
searched in the directory specified by 'tnt_dir'. 'tnt_cookiefile',
'resy_log_file' and 'autobox_dir' must contain the complete path to the file.
3.1.4 Lines of virtual screens
------------------------------
'lines_command' : Number of lines of the command screen.
'lines_monitor' : Number of lines of the monitor screen.
'lines_input' : Number of lines of the input part of the connect screen.
'lines_output' : Number of lines of the output part of the connect screen.
'scr_divide' : Input/output-lines ratio on real screen (connect).
Example: Real screen has 25 Lines, scr_divide is 5.
25 Lines - 2 Statuslines = 23 lines for input/output.
23 / 5 = 4.6 -> 4 lines on input.
23 - 4 = 19 lines for output.
'lines_mbinput' : Number of lines of the input part of the mailbox screen.
'lines_mboutput': Number of lines of the output part of the mailbox screen.
'mbscr_divide' : Input/output-lines ratio on real screen (mailbox).
'lines_xmon' : Number of lines of the output part of the extended
monitor screen.
'lines_xmon_pre': Number of lines of the input part of the extended
monitor screen.
'xmon_scr_divide': Input/output-lines ratio on real screen (extended
monitor screen).
3.1.5 Display configuration
---------------------------
'color' : non color attributes (0) or color attributes (1)
'termcap' : use LINUX-console control codes (0) or /etc/termcap (1)
if color and LINUX-console control codes are selected, but the TERM entry
in the environment is not "console", no color and termcap is used.
3.1.6 Screen attributes
-----------------------
Depending on the selected mode (color) the color or monochrom attributes
are used.
Important notice: The attributes for normal text and for controlcharcters
in the input field MUST be different, otherwise no control-characters can
be sent.
3.1.6.1 Color attributes
------------------------
'attc_normal' : For normal text.
'attc_statline' : For main statusline at the bottom of the screen.
'attc_monitor' : For monitor headers.
'attc_cstatline' : For statusline of channel in connect screen.
'attc_controlchar': For controlcharacters in the input field.
'attc_remote' : For text transmitted because of remote functions.
The attributes are coded in the following manner:
X X X X X X X X
Blink BCo2 BCo1 BCo0 FCo3 FCo2 FCo1 FCo0
Background- Foreground-
Colour Colour
Blink:
0:off, 1:on
Background Color:
BCo2 BCo1 BCo0
Black 0 0 0
Red 0 0 1
Green 0 1 0
orange 0 1 1
blue 1 0 0
magenta 1 0 1
cyan 1 1 0
white 1 1 1
Foreground Color:
FCo3 FCo2 FCo1 FCo0
Black 0 0 0 0
Red 0 0 0 1
Green 0 0 1 0
Orange 0 0 1 1
Blue 0 1 0 0
Magenta 0 1 0 1
Cyan 0 1 1 0
White 0 1 1 1
Grey 1 0 0 0
Light red 1 0 0 1
Light green 1 0 1 0
yellow 1 0 1 1
Light blue 1 1 0 0
Light magenta 1 1 0 1
Light cyan 1 1 1 0
Light white 1 1 1 1
3.1.6.2 Monochrom attributes
----------------------------
'attm_normal' : For normal text.
'attm_statline' : For main statusline at the bottom of the screen.
'attm_monitor' : For monitor headers.
'attm_cstatline' : For statusline of channel in connect screen.
'attm_controlchar': For controlcharacters in the input field.
'attm_remote' : For text transmitted because of remote functions.
The attributes are coded in the following manner:
X X X X X X X X
Att5 Att4 Att3 Att2 Att1 Att0
Att0: Standout (termcap so/se)
Att1: Underline (termcap us/ue)
Att2: Blink (termcap mb/me)
Att3: Reverse (termcap mr/me)
Att4: Bold (termcap md/me)
Att5: Halfbright (termcap mh/me)
0: off, 1: on
3.1.7 Packet assembly timeout
-----------------------------
'pty_timeout' : Time for packet assembly
All characters received by a shell or redirection are buffered. If the
buffer reaches the maximum packetsize (256 bytes) the buffer is transmitted.
After each new character pty_timeout seconds are waited for the next
character. If during this time no character is given, the buffer will be
sent even if the maximum packetsize is not reached.
3.2 TNC-configuration files
---------------------------
At the startup of the program a command script is executed. It can be used
to initialize some parameters in the TNC. The filename must be specified
after 'tnt_upfile' in the init file.
To set up different callsigns on specific channels the following command
sequence can be used:
...
CHANNEL 4
MYCALL DL4YBG-4
CHANNEL 5
MYCALL DL4YBG-5
CHANNEL 6
MYCALL DL4YBG-6
...
After the EXIT command is given another command script is executed before
the termination of the program. The filename must be specified after
'tnt_downfile' in the init file.
3.3 Cookie file
---------------
If fortune cookie sending is active (command COOKIE) and someone is connecting
to the station a randomly selected cookie out of the cookie file will be sent.
The cookie file consists of cookie texts delimited by a line containg a '-'
as the first character (the rest of the line will be ignored). The minimal
size of a cookie file is 2048 bytes.
The filename of the cookie file must be given after 'tnt_cookiefile' in the
init file.
3.4 Files for remote commands
-----------------------------
If the remote command //help is received a file specified after
'rem_help_file' in the init file is transmitted.
The file shall contain an overview and an explanation of the possible remote
commands.
If the remote command //info is received a file specified after
'rem_info_file' in the init file is transmitted.
The file shall contain a description of the station and the used equipment.
If the remote command //news is received a file specified after
'news_file_name' in the init file is transmitted.
The file shall contain any news about the station.
3.5 Files for connect text
--------------------------
If connect text sending is active (command CONTEXT) and someone is connecting
to the station a special connect text will be sent.
The connect text is fetched from the file specified after 'tnt_ctextfile'.
Any macros contained in the file will be expanded.
It is possible to send several users a personal connect text. To achieve this
a file called <callsign>.ctx must be put to the directory specified after
'ctext_dir', where <callsign> is the call of the user.
3.6 Files for names database and routing scripts
------------------------------------------------
For use with the connect text feature a names database is included. The
database itself is contained in the file specified after 'name_file_name'.
The same file is used for the database for the routing scripts.
The entries for routing scripts can be recursive, it is not needed to
specify the whole path for each callsign.
The path is assembled using the relevant entries in the database.
In front of the callsign a letter specifies the type of the station:
T : Normal user
N : Network node
All other characters are accepted.
The only difference is the treatment of the call in routing scripts.
The database is a text file containing lines like the following:
T>DL4YBG Mark
-> The name of the operator of station DL4YBG is Mark, no routing information
given or station can be reached directly.
T>DL7ZZZ Joe; N>DB0LUC T>DL7ZZZ
-> The name of the operator of station DL7ZZZ is Joe, the station can be
connected from digipeater DB0LUC.
N>DB0BLO Digi 9K6
-> The digipeater DB0BLO can be connected directly.
N>DB0BER Digi Tempelhof; N>DB0BLO N>DB0BER
-> The digipeater DB0BER can be connected from digipeater DB0BLO.
N>DB0LUC Digi Luckau; N>DB0BER F>DB0BLN N>DB0LUC
-> The digipeater DB0LUC can be connected from digipeater DB0BER via DB0BLN.
3.7 User-Id's and security
--------------------------
For every user it is possible to log into the UNIX-system by using //SHELL
or if the operator uses the SHELL command for the channel.
The callsign of the connected station is used as the user-id.
If there is no user-id existing with this call sign and 'unix_new_user' is
not set, the user-id "guest" is used.
Because at the moment there is no security for the password, no passwords
are used.
If you don't use 'unix_new_user' you must prepare the user-id's of the
authorized users yourself.
Therefore the entries in /etc/passwd shall look like:
guest::407:109::/home/guest:
dl4ybg::405:101::/home/dl4ybg:
These user-id's must not appear in /etc/shadow (only if shadow passwords
are used).
Hint: The user guest can be created using 'useradd -m guest', then
/etc/passwd must be adapted and the password-entry in /etc/shadow
(only if shadow passwords are used) must be erased. Try a login
from a virtual terminal prior to logging in via remote command.
IMPORTANT:
Check the file permissions on your system and use a password for root, now
you are not alone any longer!
3.8 Logfile for resyncronisation
--------------------------------
If during operation a resyncronisation is frequently started, it might be
useful to track down the reason for it. This can be achieved by specifying
'resy_log_file' in the init-file. The full path to the file must be given.
If left blank no resync log file is written.
Have a look at the size of the resync file, it is advisable to remove it
from time to time to regain disc space.
3.9 File for keyboard macros
----------------------------
sample fkeys.tnt:
#
# Function-Key-File
#
# XX:text
# XX::command
#
# '*' at end sends CR after a text
#
01::send .signature
02:***end*
03::c db0abc
04::c db0zzz-8
08::logblist
09::blist
10::xblist
<EOF>
3.10 File for password generation
---------------------------------
sample pw.tnt:
# sample password file
# all lines must use the following format:
# <callsign> <password-type> <password-file>
# DieBox DB0XXX
DB0XXX-3 DIEBOX /work/tnt/db0xxx.pw
<EOF>
4. Options at startup
---------------------
Usage : tnt [-i <init-file>] [-l <log-file>] [-u]
TNT has three startup options. A file after -i is taken as the init file and
a file after -l is opened on channel 1 equal to a LOGREC command. If the
program was not normally ended and the serial port is locked, the lockfile
can be ignored with -u.
The -l option is useful if the TNC holds data from the time without
a terminal.
5. Running under X11
--------------------
TNT needs a XTERM console for execution under X11. Therefore TNT can be
started from every XTERM shell.
A sample script file 'xtnt' can be used to create a new window for TNT. To
change the parameters in 'xtnt' see the manual entry for XTERM.
6. Porting of TNT
-----------------
In config.h several options can be defined or undefined. Create a new entry
in config.h and a new makefile for your operating system. At the moment
Linux and Interactive UNIX (ISC) are supported.
The codes generated by function and special keys are defined in keys.h and
must be adapted.
Because in most cases not all keys are listed in the /etc/termcap entry the
keycodes are defined in this way.
If your porting was successful, please send me your changes. They will be
included then in the next release.
7. The end
----------
Thanks to Dieter, DK5SG / N0PRA for wampes. The source code contains many
interesting things and I took some parts of the shell-functions out of the
wampes-code.
Thanks to Joerg, DD8FR for providing the code for macro expansion in the
connect text and for using more than 80 characters per line.
Patrick (ex DL7AUC), who has ported TNT to ISC Unix and has contributed many
ideas and additional code for the socket feature, lost his life in
an accident. His work and support was very much appreciated and will be
missed very much. He will always be remembered.
Thanks to Joachim, DL8HBS (author of DigiPoint for ATARI) for providing me
with his sourcecode. Thanks also for the hours of discussing and planning
the porting of the box-part of DP to Linux and for the support during the
debugging sessions.
Thanks to Gert, DK3NY for the implementation of the password generation
for DIEBOX-BBS's.
Thanks to Andreas, DK9HE for analysing and fixing the startup problem if
TNT was not invoked by root.
Thanks to all who have tested TNT and have given comments.
And last but not least thanks to Linus and all of the Linux-community for
giving us a superb operating system.
Special thanks to Joseph H. Allen for the JOE-editor and Dave Gillespie
for the P2C Pascal to C translator.
If you have questions, comments or bug reports, just write a mail:
Ham Radio : DL4YBG @ DB0BLO.#BLN.DEU.EU
Internet : wahlm@zelator.de
73, Mark Wahl (DL4YBG)